import React, { Component } from "react";
import  Tablecontent from './homechild/table.jsx';
import {Tabs} from 'antd';
import {reqList} from '../../../api/index';
import './home.scss';
const tabName=[
  {key:1,name:'上传简历',children:<Tablecontent title={123}/>},
  {key:2,name:'面试简历',children:456},
  {key:3,name:'淘汰简历',children:789}
]
class Home extends Component{
  state={
    homeData:[]
  }
  componentDidMount(){
    reqList().then(res=>
      this.setState({
        homeData:res.data
      }))
  }
    render(){
        return (
         <>
         <div className="wap">
         <div className="wrapper">
          {
            this.state.homeData.map(item=>
              <div className="wrapper-left image1" key={item.id}>
              <div className="wrapper-number">{item.resume}</div>
              <div className="wrapper-status">{item.status}</div>
            </div>
            )}
         </div>
         <div className="tabsWrapper">
          <Tabs
            defaultActiveKey="1"
            size="large"
            tabBarGutter={'300%'}
            items={tabName.map(item=>{
              return{
                label:item.name,
                key:item.key,
                children:item.children
              }
            })}
        />
        </div>
         </div>
        </>
        )
    }
}
export default Home;